<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <!-- INTERFACE -->
    <cc:interface>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <p:dataTable id="dishList" var="dishHelper" value="#{outletManagerIOTRManagedBean.festiveItems}" 
                     emptyMessage="Currently no festive items have been added"
                     dynamic ="true" paginatorPosition="top"
                     paginator="true" rows="6"
                     rowStyleClass="#{dishHelper.isPromotion 
                                      ? 'promotion' : 'nonpromotion'}">
            <f:facet name="header">
                Existing festive items
            </f:facet>

            <p:column headerText="ID">
                <h:outputText id="dishID" value="#{dishHelper.id}" />
            </p:column>
            <p:column headerText="Name">
                <h:outputText id="dishName" value="#{dishHelper.name}" />
            </p:column>
            <p:column headerText="Can deliver">
                <h:outputText id="dishCanDeliver" value="#{dishHelper.canDeliver}" />
            </p:column>
            <p:column headerText="Is Promotion">
                <h:outputText id="dishIsPromotion" value="#{dishHelper.isPromotion}" />
            </p:column>
            <p:column headerText="Is For Sale">
                <h:outputText id="mealIsForSale" value="#{dishHelper.isForSale}" />
            </p:column>
            <p:column headerText="Price">
                <h:outputText id="dishPrice" value="#{dishHelper.cost}" />
            </p:column>
        </p:dataTable>
    </cc:implementation>
</html>